package com.sdehua.wear.utils;

import java.io.Serializable;

/**
 * @Description TODO
 * @Author sdehua-帅德华
 * @Email sdhstart@qq.com
 * @Date 2022/1/1 12:30
 * @Version 1.0
 **/
public class ResultEntity implements Serializable {
    private static final long serialVersionUID = -93928489324496409L;
    private String result;
    private Integer status; // 0 失败 ；1 成功
    private Object content;

    public static ResultEntity success(Object content){
        ResultEntity resultEntity = new ResultEntity();
        resultEntity.result = "SUCCESS";
        resultEntity.status = 1;
        resultEntity.content=content;
        return resultEntity;
    }
    public static ResultEntity fail(Object content){
        ResultEntity resultEntity = new ResultEntity();
        resultEntity.result = "FAIL";
        resultEntity.status = 0;
        resultEntity.content=content;
        return resultEntity;
    }

    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Object getContent() {
        return content;
    }

    public void setContent(Object content) {
        this.content = content;
    }
}
